{extend name="public/base"/}
{block name="body"}
<script type="text/javascript">
    var type = "{$type}";
    $("title").text('我的地址');
    $(document).ready(vip_obj.myaddress);
</script>
<nav>
    <ul>
        {volist name="myadressList" id="vo"}
        <li data-pid="{$vo.id}">
            <div class="top">
                <p>{$vo.linkman}<span class="number">{$vo.linktel}</span></p>
                <p>{$vo.province}{$vo.city}{$vo.area}{$vo.address}</p>
            </div>
            <div class="bn">
                <span class="xuan">
                    {if condition="$vo['is_default'] eq 1"}
                    <div class="add">
                        <p class="bg bg1"></p>
                        <div class="addrt mo">默认地址</div>
                    </div>
                    {else/}
                    <div class="add">
                        <p class="bg"></p>
                        <div class="addrt">设为默认</div>
                    </div>
                    {/if}
                </span>
                <a href="{:url('Vip/addressadd',array('id'=>$vo['id']))}">
                    <span><img src="__STATIC__/wechat/vip/images/release.png">编辑</span>
                </a>
                <botton>
                    <span class="address_del"><img src="__STATIC__/wechat/vip/images/del.png">删除</span>
                </botton>
            </div>
        </li>
        {/volist}
    </ul>
    {if condition="empty($myadressList)"}
    {assign name="nodata" value="nothing_img"}
    {include file="public/nodata"/}
    <script type="text/javascript">
        $(".nodata").show();
    </script>
    {/if}
</nav>

<a href="{:url('Vip/addressadd')}">
    <footer class="footer5">添加地址</footer>
</a>
{/block}
